<?php

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

include_once $_SERVER['DOCUMENT_ROOT'] . '/class/Material_demand.php';
$statement = $_POST["statement"];
$materials = $_POST['materials']; //需要传过来的数据$material_id, $price, $trade_number
if ($statement == "已完成") {
    $rs = new Material_demand();
    if ($rs->finish($materials)) {
        echo 1;
    } else {


        echo 0;
    }
}